﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RiseBaby.aspx.cs" Inherits="WebSite.Admin.Admin_RiseBaby" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link  href="skin_1.0/css/base.css" rel="stylesheet" type="text/css" media="all" />
<script src="/js/jquery-1.7.1.min.js"  type="text/javascript"  charset="gb2312"></script>
<script src="skin_1.0/js/Function.js" type="text/javascript" charset="gb2312"></script>
<script src="skin_1.0/js/Validator.js" type="text/javascript" charset="gb2312"></script>
<link  href="skin_1.0/js/FaceBox/FaceBox.1.2.css" rel="stylesheet" type="text/css" media="all" />
<script src="skin_1.0/js/FaceBox/FaceBox.1.2.js" type="text/javascript"  charset="gb2312"></script>
<script type="text/javascript">
<!--
    $(document).ready(function ($) {
        $("a[rel*=facebox]").facebox();
        $("#modWindow").css("display", "none");
    });

    function del(i) {
        var url = document.URL;
        if (url.substring(url.length - 1, url.length) == "&") {
            url = url.substring(0, url.length - 1);
        }
        if (window.confirm("你确定要删除吗?")) {
            if (url.indexOf("?") > 0) {
                window.location = url + "&act=del&id=" + i;
            } else {
                window.location = url + "?act=del&id=" + i;
            }
        }
    }

    function mod(id) {
        $("#ModId").attr("readOnly", "false");
        setvalue(id);
        $("#ModId").attr("readOnly", "true");
        SetPization();
    }


    function SetPization() {


    }


    function Add() {
        $("#ModId").attr("readOnly", "false");
        clearValue();
        $("#ModId").val("0");
        $("#ModId").attr("readOnly", "true");
    }

    function clearValue() {
        $("#ModId").val("");
        $("#ModBabyName").val("");
        $("#ModBabyUrl").val("");
        $("#ModBabyImage").val("");
        $("#ModOrderId").val("");
        /*
        $("#ModExInt").val("");
        $("#ModExString").val("");
        */
    }
    function setvalue(id) {
        $("#ModId").val($("#TDId" + id).text());
        $("#ModBabyName").val($("#TDBabyName" + id).text());
        $("#ModBabyUrl").val($("#TDBabyUrl" + id).text());
        $("#ModBabyImage").val($("#TDBabyImage" + id).text());
        $("#ModOrderId").val($("#TDOrderId" + id).text());
        /*
        $("#ModExInt").val($("#TDExInt" + id).text());
        $("#ModExString").val($("#TDExString" + id).text());
        */
    }




    jQuery.fn.extend({
        check: function () {
            return this.each(function () { this.checked = true; });
        },
        uncheck: function () {
            return this.each(function () { this.checked = !this.checked; });
        }
    });

    function CheckAll() {
        $("input[@type=checkbox]").check();
    }

    function UnCheckAll() {
        $("input[@type=checkbox]").uncheck();
    }
//-->
</script>
</head>

<body leftmargin="8" topmargin="8" >

<table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA" align="center">
<tr>
 <td height="26" >
  <table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td align="center">
    <a href="#modWindow" rel="facebox"><input type='button' class="coolbg np" onclick="Add();" value='添加' /></a>
 </td>
 </tr>
</table>
</td>
</tr>
</table>

<form name='form3' action='' method='get'>
<table width='98%'  border='0' cellpadding='1' cellspacing='1' bgcolor='#CBD8AC' align="center" style="margin-top:8px">
  <tr bgcolor='#EEF4EA'>
    <td  align='center'>
      <table border='0' cellpadding='0' cellspacing='0'>
	
						<tr>
							<td>Id: <input type="text" class="text" name="searchId" />&nbsp;&nbsp;</td>
							<td>宝贝名字: <input type="text" class="text" name="searchBabyName" />&nbsp;&nbsp;</td>														
							<td>排序值: <input type="text" class="text" name="searchOrderId" />&nbsp;&nbsp;</td>
							<!--<td>扩展字段1: <input type="text" class="text" name="searchExInt" />&nbsp;&nbsp;</td>
							<td>扩展字段2: <input type="text" class="text" name="searchExString" />&nbsp;&nbsp;</td>-->
					</tr>
					<tr><td colspan="7">
							同时导出: <input type="checkbox" class="text" name="toExcel" value="1" />&nbsp;&nbsp;&nbsp;
							<input type="submit" name="Search" value="查询" />							  
							</td></tr>
      </table>
    </td>
  </tr>
</table>
</form>


<form action="" method="post" id="form2">


<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
<tr bgcolor="#E7E7E7">
	<td height="24" colspan="9" >&nbsp;信息列表&nbsp;</td>
</tr>
<tr align="center" bgcolor="#FAFAF1" height="22">
<td>选择</td>
		<td> Id </td>
		<td> 宝贝名字 </td>
		<td> 宝贝外链 </td>
		<td> 宝贝图片 </td>
		<td> 排序值 </td>
		<!--<td> 扩展字段1 </td>
		<td> 扩展字段2 </td>-->
<td>操作</td>
</tr>    
<asp:Repeater ID="DataList" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
	<td><input name="SelectID" type="checkbox" id="SelectID" value="<%#Eval("Id") %>" class="np">
	<div style="display:none" id="TDID<%#Eval("Id")%>"><%#Eval("Id")%></div>
	</td>
		<td id="TDId<%#Eval("Id") %>"><%#Eval("Id")%></td>
		<td id="TDBabyName<%#Eval("Id") %>"><%#Eval("BabyName")%></td>
		<td id="TDBabyUrl<%#Eval("Id") %>"><%#Eval("BabyUrl")%></td>
		<td id="TDBabyImage<%#Eval("Id") %>"><%#Eval("BabyImage")%></td>
		<td id="TDOrderId<%#Eval("Id") %>"><%#Eval("OrderId")%></td>
		<!--
        <td id="TDExInt<%#Eval("Id") %>"><%#Eval("ExInt")%></td>
		<td id="TDExString<%#Eval("Id") %>"><%#Eval("ExString")%></td>
        -->
	<td><a href="#modWindow" rel="facebox" onclick="mod(<%#Eval("Id") %>);">修改</a> | <a href="javascript:del(<%#Eval("Id") %>);">删除</a></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>

<tr bgcolor="#FAFAF1">
<td height="20" colspan="9">
	&nbsp;
	
	<table width="100%">
	    <tr>
	        <td>
	            <input type="button" name="seltall" class="coolbg" onclick="CheckAll();" value="全选" id="Submit4" />
	            <input type="button" name="unseltall" class="coolbg" onclick="UnCheckAll();" value="取消全选" id="Button1" />
	            <input type="submit" name="delete" class="coolbg" onclick="return window.confirm('确定要删除选择的记录吗？')" value="删除" id="Submit1" />
				<input type="submit" name="pingbi" class="coolbg" onclick="return window.confirm('确定要屏蔽选择的记录吗')" value="屏蔽" id="Submit2" />
				<input type="submit" name="fabu" class="coolbg" onclick="return window.confirm('确定要发布选择的记录吗？')" value="发布" id="Submit3" />
	            
	        </td>
	        <td align="right">
	            <asp:Label ID="sPage" runat="server"></asp:Label>
	        </td>
	    </tr>
	</table>
	
</td>

</tr>

</table>

</form>





<div id="modWindow">
<form name="formImage" method="post" enctype= "multipart/form-data"  action="">
	<table border="0" cellpadding="5" style="border:1px solid #0C581B; width:370px; line-height:25px;">
		
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				Id
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModId" name="ModId" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				宝贝名字
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModBabyName" name="ModBabyName" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				宝贝外链
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModBabyUrl" name="ModBabyUrl" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				宝贝图片
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModBabyImage" name="ModBabyImage" />
				</td>
			</tr>

           <tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				上传新图片
				</td>
				<td colspan="1">
				<input id="uploadHeadImageFile" type="file" name="uploadHeadImageFile" />
				</td>
			</tr>

			<tr bgcolor="#F0EAE1">
				<td height="25" align="right" colspan="1">
				排序值
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModOrderId" name="ModOrderId" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1" style="display:none">
				<td height="25" align="right" colspan="1">
				扩展字段1
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModExInt" name="ModExInt" value="0" />
				</td>
			</tr>
			<tr bgcolor="#F0EAE1" style="display:none">
				<td height="25" align="right" colspan="1">
				扩展字段2
				</td>
				<td colspan="1">
				<input type="text" class="text" size="50" id="ModExString" name="ModExString" value="" />
				</td>
			</tr>
			
		<tr bgcolor="#F0EAE1">
			<td colspan="2" align="center"><input type="submit" name="submit3" value="提交" style="height:18px; cursor:pointer; " /></td>
		</tr>
	</table>
</form>
</div>
</body>
</html>


